﻿using NiceComponents.MulPages.Events;
using Stylet;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NiceComponents.MulPages.Pages
{
    public class Page2ViewModel : Screen, IHandle<SomeEvent>
    {
        private readonly IEventAggregator _events;

        public Page2ViewModel(IEventAggregator events)
        {
            _events = events;
            _events.Subscribe(this);
        }

        public string RecvMsg { get; set; }
        public void Handle(SomeEvent message)
        {
            Debug.WriteLine("Handle SomeEvent");
            RecvMsg = "RecvMsg=" + message.Args.Msg;
        }

    }
}
